<template>
  <div class="seckill">
    <nav-bar title="限时秒杀"></nav-bar>
    <div class="seckill-top">
      <img :src="require('@/assets/image/home/seckill.png')"
           alt="">
      <li v-for="item in 10"
          :key="item">
        <span>14:00</span>
        <span v-if="item < 2"
              class="skill-statr"> 抢购中</span>
        <span v-else
              class="skill-none">未开始</span>
      </li>
    </div>
    <div class="seckill-content">
      <good-card v-for="item in 3"
                 :key="item">
        <template #second>
          <li class="good-tag">
            <van-tag color="#fe4a09"
                     plain>包邮</van-tag>
            <van-tag color="#fe4a09"
                     plain>包邮</van-tag>
          </li>
        </template>
        <template #third>
          <span class="good-price">¥58.00</span>
        </template>
        <template #last-left>
          <li style="display:flex;align-items:center">
            <sec-progress percentage="50"
                          color="#e85014"
                          style="margin-right:0.2rem"></sec-progress>
            70%
          </li>
        </template>
        <template #last-right>
          <span class="seckill-snap">去抢购</span>
        </template>
      </good-card>
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/NavBar'
import GoodCard from '@/components/GoodCard'
import SecProgress from '@/components/SecProgress'
export default {
  data () {
    return {
    };
  },
  components: {
    NavBar,
    GoodCard,
    SecProgress
  },
  created () { },
  methods: {}
}

</script>
<style lang='scss' scoped>
.seckill {
  @include wh100;
  @include flex-column;
  background-color: #eeeeee;
  .seckill-top {
    height: 1rem;
    width: 100%;
    overflow-x: auto;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    img {
      height: 0.7rem;
      width: 1rem;
      margin: 0 0.17rem;
    }
    li {
      flex-shrink: 0;
      width: 1rem;
      height: 70%;
      margin: 0 0.1rem;
      @include flex-column;
      align-items: center;
      justify-content: space-between;
      span {
        &:first-child {
          font-size: 0.36rem;
          color: #d92a0d;
          font-weight: bold;
        }
      }
      .skill-statr {
        width: 80%;
        padding: 0.05rem 0;
        text-align: center;
        color: #ffffff;
        background: linear-gradient(to right, #f84251, #f87c33);
        font-size: 0.2rem;
        border-radius: 1rem;
      }
      .skill-none {
        font-size: 0.2rem;
        color: #888888;
      }
    }
  }
  .seckill-content {
    overflow-y: auto;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 0.1rem;
    .good-card {
      margin-bottom: 0.15rem;
    }
    .seckill-snap {
      height: 0.4rem;
      width: 1rem;
      @include flex-center;
      border-radius: 0.1rem;
      background: linear-gradient(to right, #f8464a, #f87634);
      font-size: 0.26rem;
      color: #fefefe;
    }
  }
}
</style>